/**
 * 取反,1 -> -1 ,-1 -> 1
 * @returns number|null
 */
import {isNullOrUndefined} from "./core";

export function negateNumber(num) {
    if(num==null){
        return null;
    }
    return (0.0-num)+'';
}

/**
 * 绝对值
 * @returns number|null
 */
export function absNumber(num) {
    if(isNullOrUndefined(num)){
        return null;
    }
    return Math.abs(num);
}
